﻿<html>
	<head>
		<title>Vaca Preta</title>
		<style type="text/css">
		*{
			margin: 0px;
			padding: 0px;
			font-family: arial;
		}
		body{
			background: #fafafa url('im/bg-tile-pixe-den.jpg');
		}
		a{
			text-decoration: none;
		}
		.content{
			padding: 80px;
		}
		.btn{
			padding-right: 15px;
			padding-left: 15px;
			padding-top: 10px;
			padding-bottom: 10px;
		}
		.orange_button{
			color: #ffffff;
			background-color: #D54533;
		}
		.orange_button:hover{
			background-color: #BD3928;
		}
		.white_button{
			color: #000;
			background-color: #fff;
		}
		.white_button:hover{
			background-color: #f1f1f1;
		}
		.white_icon_button{
			color: #000;
			background-color: #ffffff;
		}
		.white_icon_button:hover{
			background-color: #f1f1f1;
			border-radius: 5px;
		}
		.header_menu{
			background-color: #D54533;
			padding: 10px;
			text-align: center;
			word-spacing: 25px;
			font-size: 22px;
			position: fixed;
			width: 100%;
		}
		.header_menu ul li{
			display: inline;
		}
		.user_logged{
			float: right;
			margin-right: 15px;
			color: #f1f1f1;
		}
		.left_menu{
			text-align: left;
			margin-top: -30px;
			margin-left: -80px;
			background-color: #fff;
			border-radius: 5px;
			width: 20%;
			float: left;
		}
		.left_menu a{
			color: #000;
		}
		.left_menu ul li{
			list-style: none;
			list-style-position: outside;
			line-height: 40px;
		}
		.subitem:hover{
			background-color: #999;
			color: #fff;
		}
		</style>
	</head>
	<body>
		<div class="header_menu">
		<ul>
			<li>
					<a href="/">
						<span class="btn orange_button">Início</span>
					</a>
				</li>
			<li>
					<a href="/produtos_lista">
						<span class="btn orange_button">Produtos</span>
					</a>
			</li>	
			<li>
					<a href="/carrinho">
						<span class="btn orange_button">Carrinho</span>
					</a>
				</li>
			
			
			
			
			<% if session[:logado] != nil%>
				<%
					cliente_logado = Cliente.find(session[:logado])
				%>
				
				<li>
					<a href="/produtos_cadastro">
						<span class="btn orange_button">Cadastrar produtos</span>
					</a>
				</li>
				
				<span class="btn orange_button">Bem vindo <%= cliente_logado.nome %></span> 
				<li>
				<a href="/logout">
				<span class="btn orange_button">Desconectar</span>
				</a>
				</li>
				<li>
				<a href="/fazer_venda">
				<span class="btn orange_button">Venda</span>
				</a>
				</li>
			<% else %>
				
				<a href="/login">
				<span class="btn orange_button">Login</span>
				</a>
				<a href="/novo_cliente">
				<span class="btn orange_button">Cadastre-se</span>
				</a>
			<% end %>
			</ul>
		</div>
		<%= yield %>
	</body>
</html>
	
